﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DimOS.Internals
{
    public class CharColor
    {
        public char Character;
        public byte Color;

        public CharColor(char character, byte color)
        { Character = character; Color = color; }

        public CharColor(char character, ConsoleColor foreground, ConsoleColor background)
        { Character = character; Color = (byte)(((byte)(foreground) & 0x0F) | ((byte)(background) << 4)); }

        public static string ToString(List<CharColor> list)
        {
            var result = "";
            for (int i = 0; i < list.Count; i++) result += list[i].Character;
            return result;
        }
    }
}
